<?php $this->load->view('_header'); ?>

<style type="text/css">
    #right .adviser{
        float: left;
        padding: 5px;
        text-align: center;
    }
    .adviser img{
        width: 160px;
        height: 45px;
        border: none;
    }
</style>
<div id="main-content">
    <div id="left">
        <div id="news">
            <div class="title">
                <a href="/index.php?c=home&m=news" class="link">久灵资讯</a>
                <a href="/index.php?c=home&m=news" class="more">更多</a>
            </div>
            <div class="content">
                <ul>
                    <?php foreach ($news as $n): ?>
                        <li>
                            <div class="time right"><?php echo date('Y-m-d',strtotime($n->created_at)); ?></div>
                            <a href="/index.php?c=news&m=show&id=<?php echo $n->id; ?>">
                                <?php echo substr($n->title,0,24).(strlen($n->title)>20?'……':''); ?>
                            </a>
                        </li>
                    <?php endforeach; ?>
                    </ul>
                </div>
            </div>
            <div id="contact">
                <div class="title">
                    <a class="link" href="/index.php?c=home&m=contact">联系我们</a>
                    <a class="more" href="/index.php?c=home&m=contact">more</a>
                </div>
                <div class="content">
                    <div class="img"><img src="/assets/images/contact.gif" alt="contact"/></div>
                    <ul>
                        <?php if($contact != false): ?>
                        <li>联系电话：<?php echo $contact->telephone; ?></li>
                        <li>电子邮箱：<?php echo $contact->email; ?></li>
                        <li>详细地址：<?php echo $contact->address; ?></li>
                        <?php else: ?>
                        <li>联系电话：0371—86101071</li>
                        <li>电子邮箱：hn90law@163.com</li>
                        <li>详细地址：河南省郑州市金水区曼哈顿广场6幢1单元6层东户</li>
                        <?php endif; ?>
                    </ul>
                    <div class="img"><img src="/assets/images/map.gif" alt="map"/></div>
                </div>
            </div>
        </div>

        <div id="right">
            <h5 class="main-nav-links">
                <a href="/index.php?c=home&m=index">首页</a> >> 顾问单位
            </h5>
            <div class="content"><?php foreach ($advisers as $adviser): ?>
                    <div class="adviser">
                        <a href="/index.php?c=adviser&m=show&id=<?php echo $adviser->id; ?>">
                            <?php echo img('/assets/images/' . (($photo = $this->photo->find($adviser->logo)) ? $photo->file_name : 'adviser-logo.gif')); ?>
                        </a>
                            <h5><?php echo $adviser->name; ?></h5>
                        </div>            
            <?php endforeach; ?></div>
                    </div>
                    <div class="clear"></div>
                </div>


<?php $this->load->view('_footer'); ?>